Efficient software closing of hardware-generated encoding context

ABSTRACT

Systems, methods, and computer-readable media are described for performing data compression in a manner that does not require software to make a call to hardware to close a compressed data block, thereby reducing computational overhead. In response to a request from software to data compression hardware for a data encoding, the hardware may return the data encoding as well as an end-of-block symbol encoding value and bit length. The hardware may load the end-of-block symbol encoding value and bit length into a different area in the returned structure such that the software has direct access to the value. When the software determines that a block should be closed, the software may retrieve the end-of-block symbol and insert it into the block without needing to make a call to hardware. The software may then make a call to the hardware to request a new data encoding for subsequent compressed data blocks.

DOMESTIC PRIORITY

This application is a continuation of U.S. patent application Ser. No.15/948,763, filed Apr. 9, 2018, the disclosure of which is incorporatedby reference herein in its entirety.

BACKGROUND

The process of reducing the size of a data file is referred to as datacompression. Data compression involves encoding information using fewerbits than the original representation. In the context of datatransmission, the process may be referred to as source coding—encodingdone at the source of the data before it is stored or transmitted. Datacompression is useful because it reduces resources required to store andtransmit data. Computational resources are consumed in the compressionprocess, and typically, in the reversal of the process (decompression).The design of data compression schemes involves trade-offs among variousfactors including the degree of compression, the amount of distortionintroduced (if lossy data compression is used), and the computationalresources required to compress and decompress data.

SUMMARY

In one or more example embodiments, a method for compressing data isdisclosed. The method includes sending input data to hardware configuredto perform data compression and storing, by the hardware, a dataencoding generated based at least in part on the input data and rawend-of-block symbol data in data storage. The method further includessending the data and the data encoding to the hardware for compressionof the data, receiving, from the hardware, compressed data generated bythe hardware from the data using the data encoding, and inserting thecompressed data into a current compressed data block. The methodadditionally includes determining that the current compressed data blockis to be closed, retrieving the raw end-of-block symbol data from thedata storage, inserting the raw end-of-block symbol data into thecurrent compressed data block to close the current compressed datablock, and making a call to the hardware to generate a new dataencoding.

In one or more other example embodiments, a system for compressing datais disclosed. The system includes at least one memory storingcomputer-executable instructions and at least one processor of a sendingdevice, the at least one processor being configured to access the atleast one memory and execute the computer-executable instructions toperform a set of operations. The operations include sending input datato hardware configured to perform data compression and storing, by thehardware, a data encoding generated based at least in part on the inputdata and raw end-of-block symbol data in data storage. The operationsfurther include sending the data and the data encoding to the hardwarefor compression of the data, receiving, from the hardware, compresseddata generated by the hardware from the data using the data encoding,and inserting the compressed data into a current compressed data block.The operations additionally include determining that the currentcompressed data block is to be closed, retrieving the raw end-of-blocksymbol data from the data storage, inserting the raw end-of-block symboldata into the current compressed data block to close the currentcompressed data block, and making a call to the hardware to generate anew data encoding.

In one or more other example embodiments, a computer program product forcompressing data is disclosed. The computer program product includes anon-transitory storage medium readable by a processing circuit, thestorage medium storing instructions executable by the processing circuitto cause a method to be performed. The method includes sending inputdata to hardware configured to perform data compression and storing, bythe hardware, a data encoding generated based at least in part on theinput data and raw end-of-block symbol data in data storage. The methodfurther includes sending the data and the data encoding to the hardwarefor compression of the data, receiving, from the hardware, compresseddata generated by the hardware from the data using the data encoding,and inserting the compressed data into a current compressed data block.The method additionally includes determining that the current compresseddata block is to be closed, retrieving the raw end-of-block symbol datafrom the data storage, inserting the raw end-of-block symbol data intothe current compressed data block to close the current compressed datablock, and making a call to the hardware to generate a new dataencoding.

BRIEF DESCRIPTION OF THE DRAWINGS

The detailed description is set forth with reference to the accompanyingdrawings. The drawings are provided for purposes of illustration onlyand merely depict example embodiments of the disclosure. The drawingsare provided to facilitate understanding of the disclosure and shall notbe deemed to limit the breadth, scope, or applicability of thedisclosure. In the drawings, the left-most digit(s) of a referencenumeral identifies the drawing in which the reference numeral firstappears. The use of the same reference numerals indicates similar, butnot necessarily the same or identical components. However, differentreference numerals may be used to identify similar components as well.Various embodiments may utilize elements or components other than thoseillustrated in the drawings, and some elements and/or components may notbe present in various embodiments. The use of singular terminology todescribe a component or element may, depending on the context, encompassa plural number of such components or elements and vice versa.

FIG. 1 is a schematic hybrid data flow/block diagram illustratingsoftware closing of a hardware-generated encoding context in accordancewith example embodiments.

FIG. 2 is a schematic block diagram of a DEFLATE block in accordancewith example embodiments.

FIG. 3 is a process flow diagram of an illustrative method for softwareclosing of a hardware-generated encoding context in accordance with oneor more example embodiments.

FIG. 4 is a schematic diagram of an illustrative computing deviceconfigured to implement one or more example embodiments.

DETAILED DESCRIPTION

Example embodiments include, among other things, systems, methods,computer-readable media, techniques, and methodologies for performingdata compression in a manner that does not require software to make acall to hardware to close a compressed data block, thereby reducingcomputational overhead. In particular, in accordance with exampleembodiments, in response to a request from software to data compressionhardware for a data encoding, the hardware may return the data encodingas well as an end-of-block symbol encoding value and bit length. Thehardware may load the end-of-block symbol encoding value and bit lengthinto a different area in the returned structure such that the softwarehas direct access to the value. When the software determines that acompressed data block should be closed, the software may retrieve theend-of-block encoded value and bit length and insert it into thecompressed data block without needing to make a call to hardware ormanually parse the provided encoding for all symbols. The software maythen make a call to the hardware to request a new data encoding to beused in connection with subsequent compressed data blocks.

Example embodiments will be described herein in connection with theDEFLATE compression standard. However, it should be appreciated thatembodiments of the invention may be applicable to other compressionstandards as well. The DEFLATE compression standard is a lossless datacompression algorithm and associated file format that uses a combinationof the LZ77 algorithm and Huffman encoding. Huffman encoding, alsoreferred to as Huffman coding, refers to the algorithmic process forfinding and/or using a Huffman code, which is a particular type ofoptimal prefix code that may be used for lossless data compression. Theoutput from Huffman's algorithm can be viewed as a variable-length codetable or tree for encoding a source table (e.g., a character in a file).Huffman's algorithm derives the Huffman table or tree from the estimatedprobability or frequency of occurrence (weight) for each possible valueof the source symbol, where more common symbols are generallyrepresented using fewer bits than less common symbols.

A compressed DEFLATE stream contains multiple compressed data blocks,which may be referred to as DEFLATE blocks. In order to maximizecompression ratios if data changes over the life of a file, each DEFLATEblock contains a Huffman encoding that is specific to the datarepresented by that block. Software may need to close a current DEFLATEblock and begin a new one for various reasons. In particular, whenhardware is used to compress data, the software-level interface may needto manipulate the data in the compressed data stream. For instance, arequest to compress 4 KB of data may be sent to hardware that willperform the compression. Then, software might be called to do a specifickind of flush to close a block and re-open a new block to insert somecontrol data that a decompressor can use to locate a specific spot inthe file. Various approaches are known for closing a DEFLATE block andcreating a new one. However, these approaches suffer from variousdrawbacks. Embodiments of the invention provide technical solutions thataddress at least some of these drawbacks.

For a single large input file to be compressed, the compression mayoccur in 32 KB at a time requests, for example. An existing approach forcreating a new block may be to create a custom Huffman table for each 32KB request, in which case, the output from compressing the 32 KB is oneblock in the overall DEFLATE stream. Under this approach, every call tohardware would be synonymous with a single DEFLATE block. While this isa relatively simple implementation, the compression ratio can benegatively impacted because each Huffman table that is created for each32 KB request may require over 100 bytes to be injected into thecompressed data stream. This effect on the compression ratio may be evenfurther exacerbated if the 32 KB requests become even smaller such as 4KB or less in size.

If hardware accelerated compression hardware is used, the hardwareaccelerator may generate a Huffman encoding which the software canre-use across several requests to the accelerator. While this mayobviate the compression ratio issues associated with creating andclosing a DEFLATE block for each request for compression of data insmall increments (e.g., 32 KB), it introduces additional computationaloverhead for closing a block. In particular, in order to close a DEFLATEblock and start a new block, an end-of-block symbol needs to be injectedinto the compressed data stream. For instance, when software needs toperform a flushing operation such as that described earlier, thesoftware needs to know the encoding of the end-of-block symbol (it hasan encoding itself in the Huffman table). In certain conventionalapproaches, the software may make a call to the compression hardware tohave the end-of-block symbol injected into the compressed data stream.However, this would create additional overhead for the accelerator. Inother approaches, a combined operation to insert an end-of-block symboland begin a new block may be implemented in hardware. However, thiswould make the compression hardware more complex and costly toimplement. Yet another conventional approach would be to have thesoftware indicate to the hardware that a current DEFLATE block is to beclosed while also providing the hardware with new input to becompressed. However, because all input may not be consumed, thisapproach would also introduce additional complexity in the hardwaredesign. In particular, the hardware must determine whether it shouldstill close the block if all data has not been consumed by the currentrequest for compression. Under this approach, the hardware request wouldneed to be re-run to process the additional input data before thehardware can insert the end-of-block symbol, which would introduceadditional complexity in the hardware design.

Example embodiments of the invention provide a mechanism by whichsoftware can close a compressed data block and begin a new block withoutmaking a separate call to hardware, thereby avoiding the computationaloverhead and hardware design complexity associated with making such acall, while at the same time allowing for re-use of a data encodingacross multiple compression requests. In accordance with exampleembodiments, compression hardware may generate a Huffman encoding (e.g.,a Huffman table/Huffman tree) based on some input data. The hardware maydynamically generate the Huffman table or may utilize a static onedefined by the DEFLATE standard. In accordance with example embodiments,along with the Huffman table, the hardware may provide the software withan end-of-block symbol encoding value and bit length. More specifically,the hardware may store the end-of-block symbol encoding value and bitlength in a block of storage that is directly accessible by thesoftware. For any given encoding, the end-of-block symbol (which may bedenoted as 0x100) is encoded to a specific value based on the encodingthat is used for compression. This encoded end-of-block symbol andlength may be returned by the hardware.

Software may then pass the Huffman table back to the hardware along withsome data to be compressed. The software may pass the Huffman table tothe hardware in connection with each such data compression request.Thus, the software may re-use the same Huffman table across multipledata compression requests such that compressed data continues to beadded to the same DEFLATE block. When software determines that thecurrent DEFLATE block is to be closed and a new DEFLATE block opened, itmay access the end-of-block encoding value and bit length directly fromdata storage and insert the end-of-block symbol into the DEFLATE blockto close the block without having to make an additional call to thehardware.

Example embodiments provide various technical features, technicaleffects, and/or improvements to computer technology. In particular,example embodiments provide the technical effects of allowing softwareto re-use a data encoding (e.g., a Huffman table/tree) across multipledata compression requests to hardware, while at the same time,permitting the software to close a compressed data block (e.g., aDEFLATE block) without having to make a call to hardware. Thesetechnical effects provide an improvement to computertechnology—specifically an improvement to data compression technology—byreducing the computational overhead and hardware design complexityassociated with conventional approaches to closing compressed datablocks. These technical effects are achieved, at least in part, by thetechnical feature of having the compression hardware return, tosoftware, an end-of-block symbol encoding value and bit length alongwith the data encoding itself. More specifically, along with providingthe data encoding, the hardware may store the end-of-block encodingvalue and bit length in data storage that is directly accessible by thesoftware such that the software can retrieve the end-of-block symbol andinsert it into a compressed data block to close the block without havingto make a call to the hardware.

Various illustrative methods and corresponding data structuresassociated therewith will now be described. It should be noted that eachoperation of the method 300 may be performed by one or more of theprogram modules or the like depicted in FIG. 1 or 4, whose operationwill be described in more detail hereinafter. These program modules maybe implemented in any combination of hardware, software, and/orfirmware. In certain example embodiments, one or more of these programmodules may be implemented, at least in part, as software and/orfirmware modules that include computer-executable instructions that whenexecuted by a processing circuit cause one or more operations to beperformed. A system or device described herein as being configured toimplement example embodiments may include one or more processingcircuits, each of which may include one or more processing units ornodes. Computer-executable instructions may include computer-executableprogram code that when executed by a processing unit may cause inputdata contained in or referenced by the computer-executable program codeto be accessed and processed to yield output data.

FIG. 1 is a schematic hybrid data flow/block diagram illustratingsoftware closing of a hardware-generated encoding context. FIG. 2 is aschematic block diagram of a DEFLATE block. FIG. 3 is a process flowdiagram of an illustrative method 300 for software closing of ahardware-generated encoding context. FIGS. 2 and 3 will each bedescribed in conjunction with FIG. 1 hereinafter.

Referring first to FIG. 1, an illustrative computing device 122 isdepicted. The computing device 122 may be any suitable device capable ofperforming data compression. The computing device 122 may includesoftware 102 executing on the computing device 122. The software 102 mayinclude various program modules such as one or more data compressionrequest modules 126, one or more DEFLATE block generation modules 128,and one or more DEFLATE block closing modules 130. The computing device122 may further include data storage 104 and hardware 106. The hardware106 may be configured to perform data compression in accordance with oneor more data compression algorithms/standards such as the DEFLATEstandard. The data storage 104 may be accessible by both the software102 and the hardware 106. In addition, the software 102 and the hardware106 may be configured to communicate with one another in order toperform data compression.

Referring now to FIG. 3 in conjunction with FIG. 1, at block 302 of themethod 300, computer-executable instructions of the data compressionrequest module(s) 126 may be executed to send input data 108 to thehardware 106. The input data 108 may be sent to the hardware 106 as partof a request for the hardware 106 to generate a data encoding (e.g., aHuffman table/tree) based thereon. Upon generating the Huffmantable/tree, the hardware 106 may provide the encoding to the software102 along with end-of-block data (collectively referred to as “returneddata 110”), which may be received by the software 102 at block 304 ofthe method 300. More specifically, the hardware 106 may store theencoding for the end-of-block symbol and the bit length (collectivelyreferred to as end-of-block data) in an area of the data storage 104different from where the Huffman table is stored (but perhaps adjacentto) and equally accessible by the software 102. As a result, when thesoftware 102 determines that a DEFLATE block 118 is to be closed, thesoftware 102 can retrieve the end-of-block data from the data storage104 directly without involving the hardware 106 in any way, as will bedescribed in more detail hereinafter.

The software 102 retrieving the end-of-block data directly from datastorage 104 eliminates the computational overhead that would otherwisebe associated with making a call to the hardware 106 to close the block118. In addition, because the output of the request sent at block 302 ofthe method 300 is the Huffman table stored in the format required by theDEFLATE standard (encoded and compressed), making the end-of-block dataaccessible independently of the Huffman table eliminates the need todeconstruct the encoded Huffman table to determine the encoding for theend-of-block symbol, which would be a computationally expensive task.

At block 306 of the method 300, computer-executable instructions of thedata compression request module(s) 126 may be executed to cause thesoftware 102 to send the Huffman tree/table 114 previously returned bythe hardware 106 back to the hardware 106 along with data 112 to becompressed. The hardware 106 may then compress the data 114 using theHuffman encoding 114 and return the compressed data 116 to the software102. In addition, the hardware 106 may also return an insertion byteaddress and a bit offset 132. The instruction set architecture (ISA)includes an address that points to the output buffer. After the hardware106 has completed compression of data, this address points to the bytein the DEFLATE block 118 at which insertion of the end-of-block symbolshould begin or the byte at which additional compressed data is to beincluded in the DEFLATE block 118, whichever the case may be. Inaddition, after the hardware 106 has completed compression of data, thehardware 106 must also inform the software 102 of the bit offset, whichindicates the bit position in the insertion byte at which insertion ofthe end-of-block symbol or insertion of additional compressed data is tobegin.

The software 102 may receive the compressed data 116 and the insertionbyte address and bit offset 132 at block 308 of the method 300, andcomputer-executable instructions of the DEFLATE block generationmodule(s) 128 may be executed to insert the compressed data 116 into thecurrent DEFLATE block 118 starting at a byte and a bit position withinthat byte indicated by the insertion byte address and the bit offset,respectively.

At block 310 of the method 300, computer-executable instructions of theDEFLATE block closing module(s) 130 may be executed to determine whetherthe current DEFLATE block 118 is to be closed. As previously described,the software 102 may decide to close a DEFLATE block as part of a flushoperation, for example. In response to a negative determination at block310, computer-executable instructions of the data compression requestmodule(s) 126 and the DEFLATE block generation module(s) 128 mayiteratively execute operations at block 306 and 308, respectively, toinsert additional compressed data in to the DEFLATE block 118 until apositive determination is made at block 310. In this manner, thesoftware 102 is able to re-use the same Huffman encoding 114 acrossmultiple data compression requests.

In response to a positive determination at block 310,computer-executable instructions of the DEFLATE block closing module(s)130 may be executed at block 312 of the method 300 to accessend-of-block symbol encoding 120 and bit length as well as the insertionbyte address and the bit offset from the data storage 104. As previouslydescribed, the software 102 may access the end-of-block data withouthaving to make a call to the hardware 106 because the hardwarepreviously returned this information along with the Huffman encoding114.

At block 314 of the method 300, computer-executable instructions of theDEFLATE block closing module(s) 130 may be executed to insert theend-of-block symbol 120 into the current DEFLATE block 118 to close theblock. The DEFLATE block closing module(s) 130 may insert theend-of-block symbol 120 at a byte in the DEFLATE block 118 correspondingto the insertion byte address 132 and at bit location within the bytecorresponding to the bit offset 132.

At block 316 of the method 300, computer-executable instructions of thedata compression request module(s) 126 may again be executed to make acall/send a request 124 to the hardware 106 to generate a new Huffmanencoding. After generating the new Huffman encoding, the hardware 106will return the new Huffman encoding to the software 102 along with anew end-of-block encoding value and length.

In accordance with example embodiments, the illustrative method 300provides the software 102 with the ability to add compressed data to ablock across multiple calls using the same Huffman encoding and to closethe block across the multiple calls without having to make an additionalcall to the hardware 106. With this approach, the software 102 can closean existing block and open a new block with a different Huffman encodingindependent of the hardware 106 that is compressing the data. Thisprovides maximum flexibility to the software 102 and the least compleximplementation for the hardware 106 while still providing desiredcompression ratios. It should be appreciated that in certain exampleembodiments, the software 102 may still request that the hardware 106close a block if the software 102 knows that the data stream to becompressed has ended.

FIG. 2 is a schematic block diagram of an example DEFLATE block 200. Theblock 200 may be an example representation of the DEFLATE block 118. Theblock 200 may include a header 202, compressed data 204, and anend-of-block symbol 206 (if the block 200 has been closed). The header202 may contain an encoding type bit 208 that is set to indicate whetherthe Huffman encoding used for the compressed data 204 is a staticencoding defined as part of the DEFLATE standard or a dynamic Huffmanencoding. If the encoding is a dynamic Huffman encoding, it may berepresented by a Huffman table/tree that is stored in the header 202. Ifthe encoding is static, it may not be stored in the block 200 itself

One or more illustrative embodiments of the disclosure are describedherein. Such embodiments are merely illustrative of the scope of thisdisclosure and are not intended to be limiting in any way. Accordingly,variations, modifications, and equivalents of embodiments disclosedherein are also within the scope of this disclosure.

FIG. 4 is a schematic diagram of an illustrative computing device 402configured to implement one or more example embodiments of thedisclosure. The computing device 402 may be any suitable deviceincluding, without limitation, a server, a personal computer (PC), atablet, a smartphone, a wearable device, a voice-enabled device, or thelike. While any particular component of the computing device 402 may bedescribed herein in the singular, it should be appreciated that multipleinstances of any such component may be provided, and functionalitydescribed in connection with a particular component may be distributedacross multiple ones of such a component.

Although not depicted in FIG. 4, the computing device 402 may beconfigured to communicate with one or more other devices, systems,datastores, or the like via one or more networks. Such network(s) mayinclude, but are not limited to, any one or more different types ofcommunications networks such as, for example, cable networks, publicnetworks (e.g., the Internet), private networks (e.g., frame-relaynetworks), wireless networks, cellular networks, telephone networks(e.g., a public switched telephone network), or any other suitableprivate or public packet-switched or circuit-switched networks. Suchnetwork(s) may have any suitable communication range associatedtherewith and may include, for example, global networks (e.g., theInternet), metropolitan area networks (MANs), wide area networks (WANs),local area networks (LANs), or personal area networks (PANs). Inaddition, such network(s) may include communication links and associatednetworking devices (e.g., link-layer switches, routers, etc.) fortransmitting network traffic over any suitable type of medium including,but not limited to, coaxial cable, twisted-pair wire (e.g., twisted-paircopper wire), optical fiber, a hybrid fiber-coaxial (HFC) medium, amicrowave medium, a radio frequency communication medium, a satellitecommunication medium, or any combination thereof

In an illustrative configuration, the computing device 402 may includeone or more processors (processor(s)) 404, one or more memory devices406 (generically referred to herein as memory 406), one or moreinput/output (“I/O”) interface(s) 408, one or more network interfaces410, and data storage 414. The computing device 402 may further includeone or more buses 412 that functionally couple various components of thecomputing device 402.

The bus(es) 412 may include at least one of a system bus, a memory bus,an address bus, or a message bus, and may permit the exchange ofinformation (e.g., data (including computer-executable code), signaling,etc.) between various components of the computing device 402. Thebus(es) 412 may include, without limitation, a memory bus or a memorycontroller, a peripheral bus, an accelerated graphics port, and soforth. The bus(es) 412 may be associated with any suitable busarchitecture including, without limitation, an Industry StandardArchitecture (ISA), a Micro Channel Architecture (MCA), an Enhanced ISA(EISA), a Video Electronics Standards Association (VESA) architecture,an Accelerated Graphics Port (AGP) architecture, a Peripheral ComponentInterconnects (PCI) architecture, a PCI-Express architecture, a PersonalComputer Memory Card International Association (PCMCIA) architecture, aUniversal Serial Bus (USB) architecture, and so forth.

The memory 406 may include volatile memory (memory that maintains itsstate when supplied with power) such as random access memory (RAM)and/or non-volatile memory (memory that maintains its state even whennot supplied with power) such as read-only memory (ROM), flash memory,ferroelectric RAM (FRAM), and so forth. Persistent data storage, as thatterm is used herein, may include non-volatile memory. In certain exampleembodiments, volatile memory may enable faster read/write access thannon-volatile memory. However, in certain other example embodiments,certain types of non-volatile memory (e.g., FRAM) may enable fasterread/write access than certain types of volatile memory.

In various implementations, the memory 406 may include multipledifferent types of memory such as various types of static random accessmemory (SRAM), various types of dynamic random access memory (DRAM),various types of unalterable ROM, and/or writeable variants of ROM suchas electrically erasable programmable read-only memory (EEPROM), flashmemory, and so forth. The memory 406 may include main memory as well asvarious forms of cache memory such as instruction cache(s), datacache(s), translation lookaside buffer(s) (TLBs), and so forth. Further,cache memory such as a data cache may be a multi-level cache organizedas a hierarchy of one or more cache levels (L1, L2, etc.).

The data storage 414 may include removable storage and/or non-removablestorage including, but not limited to, magnetic storage, optical diskstorage, and/or tape storage. The data storage 414 may providenon-volatile storage of computer-executable instructions and other data.The memory 406 and the data storage 414, removable and/or non-removable,are examples of computer-readable storage media (CRSM) as that term isused herein.

The data storage 414 may store computer-executable code, instructions,or the like that may be loadable into the memory 406 and executable bythe processor(s) 404 to cause the processor(s) 404 to perform orinitiate various operations. The data storage 414 may additionally storedata that may be copied to memory 406 for use by the processor(s) 404during the execution of the computer-executable instructions. Moreover,output data generated as a result of execution of thecomputer-executable instructions by the processor(s) 404 may be storedinitially in memory 406 and may ultimately be copied to data storage 414for non-volatile storage.

More specifically, the data storage 414 may store one or more operatingsystems (O/S) 416; one or more database management systems (DBMS) 418configured to access the memory 406 and/or one or more externaldatastores 426; and one or more program modules, applications, engines,managers, computer-executable code, scripts, or the like such as, forexample, data compression request module(s) 420, DEFLATE blockgeneration module(s) 422, and DEFLATE block closing module(s) 424. Anyof the components depicted as being stored in data storage 414 mayinclude any combination of software, firmware, and/or hardware. Thesoftware and/or firmware may include computer-executable instructions(e.g., computer-executable program code) that may be loaded into thememory 406 for execution by one or more of the processor(s) 404 toperform any of the operations described earlier in connection withcorrespondingly named modules.

Although not depicted in FIG. 4, the data storage 414 may further storevarious types of data utilized by components of the computing device 402(e.g., data stored in the datastore(s) 426). Any data stored in the datastorage 414 may be loaded into the memory 406 for use by theprocessor(s) 404 in executing computer-executable instructions. Inaddition, any data stored in the data storage 414 may potentially bestored in the external datastore(s) 426 and may be accessed via the DBMS418 and loaded in the memory 406 for use by the processor(s) 404 inexecuting computer-executable instructions.

The processor(s) 404 may be configured to access the memory 406 andexecute computer-executable instructions loaded therein. For example,the processor(s) 404 may be configured to execute computer-executableinstructions of the various program modules, applications, engines,managers, or the like of the computing device 402 to cause or facilitatevarious operations to be performed in accordance with one or moreembodiments of the disclosure. The processor(s) 404 may include anysuitable processing unit capable of accepting data as input, processingthe input data in accordance with stored computer-executableinstructions, and generating output data. The processor(s) 404 mayinclude any type of suitable processing unit including, but not limitedto, a central processing unit, a microprocessor, a Reduced InstructionSet Computer (RISC) microprocessor, a Complex Instruction Set Computer(CISC) microprocessor, a microcontroller, an Application SpecificIntegrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), aSystem-on-a-Chip (SoC), a digital signal processor (DSP), and so forth.Further, the processor(s) 404 may have any suitable microarchitecturedesign that includes any number of constituent components such as, forexample, registers, multiplexers, arithmetic logic units, cachecontrollers for controlling read/write operations to cache memory,branch predictors, or the like. The microarchitecture design of theprocessor(s) 404 may be capable of supporting any of a variety ofinstruction sets.

Referring now to other illustrative components depicted as being storedin the data storage 414, the O/S 416 may be loaded from the data storage414 into the memory 406 and may provide an interface between otherapplication software executing on the computing device 402 and hardwareresources of the computing device 402. More specifically, the O/S 416may include a set of computer-executable instructions for managinghardware resources of the computing device 402 and for providing commonservices to other application programs. In certain example embodiments,the O/S 416 may include or otherwise control execution of one or more ofthe program modules, engines, managers, or the like depicted as beingstored in the data storage 414. The O/S 416 may include any operatingsystem now known or which may be developed in the future including, butnot limited to, any server operating system, any mainframe operatingsystem, or any other proprietary or non-proprietary operating system.

The DBMS 418 may be loaded into the memory 406 and may supportfunctionality for accessing, retrieving, storing, and/or manipulatingdata stored in the memory 406, data stored in the data storage 414,and/or data stored in external datastore(s) 454. The DBMS 418 may useany of a variety of database models (e.g., relational model, objectmodel, etc.) and may support any of a variety of query languages. TheDBMS 418 may access data represented in one or more data schemas andstored in any suitable data repository. Data stored in the datastore(s)454 may include, for example, media data 456. For instance, thedatastore(s) 454 may include the media database 138 and the media data456 may include the media data streams 140. External datastore(s) 454that may be accessible by the computing device 402 via the DBMS 418 mayinclude, but are not limited to, databases (e.g., relational,object-oriented, etc.), file systems, flat files, distributed datastoresin which data is stored on more than one node of a computer network,peer-to-peer network datastores, or the like.

Referring now to other illustrative components of the computing device402, the input/output (I/O) interface(s) 408 may facilitate the receiptof input information by the computing device 402 from one or more I/Odevices as well as the output of information from the computing device402 to the one or more I/O devices. The I/O devices may include any of avariety of components such as a display or display screen having a touchsurface or touchscreen; an audio output device for producing sound, suchas a speaker; an audio capture device, such as a microphone; an imageand/or video capture device, such as a camera; a haptic unit; and soforth. Any of these components may be integrated into the computingdevice 402 or may be separate. The I/O devices may further include, forexample, any number of peripheral devices such as data storage devices,printing devices, and so forth.

The I/O interface(s) 408 may also include an interface for an externalperipheral device connection such as universal serial bus (USB),FireWire, Thunderbolt, Ethernet port or other connection protocol thatmay connect to one or more networks. The I/O interface(s) 408 may alsoinclude a connection to one or more antennas to connect to one or morenetworks via a wireless local area network (WLAN) (such as Wi-Fi) radio,Bluetooth, and/or a wireless network radio, such as a radio capable ofcommunication with a wireless communication network such as a Long TermEvolution (LTE) network, WiMAX network, 3G network, etc.

The computing device 402 may further include one or more networkinterfaces 410 via which the computing device 402 may communicate withany of a variety of other systems, platforms, networks, devices, and soforth. The network interface(s) 410 may enable communication, forexample, with one or more other devices via one or more of thenetwork(s) 406.

It should be appreciated that the program modules/engines depicted inFIG. 4 as being stored in the data storage 414 are merely illustrativeand not exhaustive and that processing described as being supported byany particular module may alternatively be distributed across multiplemodules, engines, or the like, or performed by a different module,engine, or the like. In addition, various program module(s), script(s),plug-in(s), Application Programming Interface(s) (API(s)), or any othersuitable computer-executable code hosted locally on the computing device402 and/or other computing devices accessible via one or more networks,may be provided to support functionality provided by the modulesdepicted in FIG. 4 and/or additional or alternate functionality.Further, functionality may be modularized in any suitable manner suchthat processing described as being performed by a particular module maybe performed by a collection of any number of program modules, orfunctionality described as being supported by any particular module maybe supported, at least in part, by another module. In addition, programmodules that support the functionality described herein may beexecutable across any number of cluster members in accordance with anysuitable computing model such as, for example, a client-server model, apeer-to-peer model, and so forth. In addition, any of the functionalitydescribed as being supported by any of the modules depicted in FIG. 4may be implemented, at least partially, in hardware and/or firmwareacross any number of devices.

It should further be appreciated that the computing device 402 mayinclude alternate and/or additional hardware, software, or firmwarecomponents beyond those described or depicted without departing from thescope of the disclosure. More particularly, it should be appreciatedthat software, firmware, or hardware components depicted as forming partof the computing device 402 are merely illustrative and that somecomponents may not be present or additional components may be providedin various embodiments. While various illustrative modules have beendepicted and described as software modules stored in data storage 414,it should be appreciated that functionality described as being supportedby the modules may be enabled by any combination of hardware, software,and/or firmware. It should further be appreciated that each of theabove-mentioned modules may, in various embodiments, represent a logicalpartitioning of supported functionality. This logical partitioning isdepicted for ease of explanation of the functionality and may not berepresentative of the structure of software, hardware, and/or firmwarefor implementing the functionality. Accordingly, it should beappreciated that functionality described as being provided by aparticular module may, in various embodiments, be provided at least inpart by one or more other modules. Further, one or more depicted modulesmay not be present in certain embodiments, while in other embodiments,additional program modules and/or engines not depicted may be presentand may support at least a portion of the described functionality and/oradditional functionality.

One or more operations of the method 300 may be performed by a computingdevice 402 having the illustrative configuration depicted in FIG. 4, ormore specifically, by one or more program modules, engines,applications, or the like executable on such a device. It should beappreciated, however, that such operations may be implemented inconnection with numerous other device configurations.

The operations described and depicted in the illustrative method of FIG.3 may be carried out or performed in any suitable order as desired invarious example embodiments of the disclosure. Additionally, in certainexample embodiments, at least a portion of the operations may be carriedout in parallel. Furthermore, in certain example embodiments, less,more, or different operations than those depicted in FIG. 3 may beperformed.

Although specific embodiments of the disclosure have been described, oneof ordinary skill in the art will recognize that numerous othermodifications and alternative embodiments are within the scope of thedisclosure. For example, any of the functionality and/or processingcapabilities described with respect to a particular system, systemcomponent, device, or device component may be performed by any othersystem, device, or component. Further, while various illustrativeimplementations and architectures have been described in accordance withembodiments of the disclosure, one of ordinary skill in the art willappreciate that numerous other modifications to the illustrativeimplementations and architectures described herein are also within thescope of this disclosure. In addition, it should be appreciated that anyoperation, element, component, data, or the like described herein asbeing based on another operation, element, component, data, or the likemay be additionally based on one or more other operations, elements,components, data, or the like. Accordingly, the phrase “based on,” orvariants thereof, should be interpreted as “based at least in part on.”

The present disclosure may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent disclosure.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present disclosure may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present disclosure.

Aspects of the present disclosure are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A computer-implemented method for compressingdata, the method comprising: sending input data to hardware configuredto perform data compression; storing, by the hardware, a data encodinggenerated based at least in part on the input data and end-of-blocksymbol data in data storage; sending the data and the data encoding tothe hardware for compression of the data; receiving, from the hardware,compressed data generated by the hardware from the data using the dataencoding; inserting the compressed data into a current compressed datablock; determining that the current compressed data block is to beclosed; retrieving the end-of-block symbol data from the data storage;and closing the current compressed data block based at least in part onthe end-of-block symbol data.
 2. The computer-implemented method ofclaim 1, wherein closing the current compressed data block comprisesclosing the current compressed data block without making a call to thehardware.
 3. The computer-implemented method of claim 1, furthercomprising making a call to the hardware to generate a new dataencoding.
 4. The computer-implemented method of claim 1, wherein theend-of-block symbol data comprises an end-of-block symbol encoded valueand a bit length of the end-of-block symbol encoded value, and whereinclosing the current compressed data block comprises inserting theend-of-block symbol encoded value in the current compressed data block.5. The computer-implemented method of claim 4, further comprising:determining a byte in the current compressed data block at which tobegin insertion of the end-of-block symbol encoded value; and receiving,from the hardware, an indication of a bit offset, wherein inserting theend-of-block symbol encoded value into the current compressed data blockcomprises inserting the end-of-block symbol encoded value beginning at abit in the determined byte corresponding to the bit offset.
 6. Thecomputer-implemented method of claim 1, wherein determining that thecurrent compressed data block is to be closed comprises determining thata flush operation is to be performed to insert control data into acompressed data stream containing the current compressed data block,wherein the control data enables a decompressor to identify a specificlocation in the compressed data stream.
 7. The computer-implementedmethod of claim 1, wherein the data encoding is a Huffman encoding andthe current compressed data block is a DEFLATE block, wherein theHuffman encoding is a dynamic encoding, wherein the Huffman encoding isrepresented as a Huffman tree in a header of the DEFLATE block based atleast in part on the Huffman encoding being the dynamic encoding, andwherein the header further comprises an encoding type bit set toindicate that the Huffman encoding is the dynamic encoding.
 8. A systemfor compressing data, the system comprising: at least one memory storingcomputer-executable instructions; and at least one processor configuredto access the at least one memory and execute the computer-executableinstructions to: send input data to hardware configured to perform datacompression; store, by the hardware, a data encoding generated based atleast in part on the input data and end-of-block symbol data in datastorage; send the data and the data encoding to the hardware forcompression of the data; receive, from the hardware, compressed datagenerated by the hardware from the data using the data encoding; insertthe compressed data into a current compressed data block; determine thatthe current compressed data block is to be closed; retrieve theend-of-block symbol data from the data storage; and close the currentcompressed data block based at least in part on the end-of-block symboldata.
 9. The system of claim 8, wherein the at least one processor isconfigured to close the current compressed data block by executing thecomputer-executable instructions to close the current compressed datablock without making a call to the hardware.
 10. The system of claim 8,wherein the at least one processor is further configured to execute thecomputer-executable instructions to make a call to the hardware togenerate a new data encoding.
 11. The system of claim 8 wherein theend-of-block symbol data comprises an end-of-block symbol encoded valueand a bit length of the end-of-block symbol encoded value, and whereinthe at least one processor is configured to close the current compresseddata block by executing the computer-executable instructions to insertthe end-of-block symbol encoded value in the current compressed datablock.
 12. The system of claim 11, wherein the at least one processor isfurther configured to execute the computer-executable instructions to:determine a byte in the current compressed data block at which to begininsertion of the end-of-block symbol encoded value; and receive, fromthe hardware, an indication of a bit offset, wherein the at least oneprocessor is configured to insert the end-of-block symbol encoded valueinto the current compressed data block by executing thecomputer-executable instructions to insert the end-of-block symbolencoded value beginning at a bit in the determined byte corresponding tothe bit offset.
 13. The system of claim 8, wherein the at least oneprocessor is configured to determine that the current compressed datablock is to be closed by executing the computer-executable instructionsto determine that a flush operation is to be performed to insert controldata into a compressed data stream containing the current compresseddata block, wherein the control data enables a decompressor to identifya specific location in the compressed data stream.
 14. The system ofclaim 8, wherein the data encoding is a Huffman encoding and the currentcompressed data block is a DEFLATE block, wherein the Huffman encodingis a dynamic encoding, wherein the Huffman encoding is represented as aHuffman tree in a header of the DEFLATE block based at least in part onthe Huffman encoding being the dynamic encoding, and wherein the headerfurther comprises an encoding type bit set to indicate that the Huffmanencoding is the dynamic encoding.
 15. A computer program product forcompressing data, the computer program product comprising a computerreadable storage medium having program instructions embodied therewith,the program instructions executable by a processing circuit to cause theprocessing circuit to perform a method comprising: sending input data tohardware configured to perform data compression; storing, by thehardware, a data encoding generated based at least in part on the inputdata and end-of-block symbol data in data storage; sending the data andthe data encoding to the hardware for compression of the data;receiving, from the hardware, compressed data generated by the hardwarefrom the data using the data encoding; inserting the compressed datainto a current compressed data block; determining that the currentcompressed data block is to be closed; retrieving the end-of-blocksymbol data from the data storage; and closing the current compresseddata block based at least in part on the end-of-block symbol data. 16.The computer program product of claim 15, wherein closing the currentcompressed data block comprises closing the current compressed datablock without making a call to the hardware.
 17. The computer programproduct of claim 15, the method further comprising making a call to thehardware to generate a new data encoding.
 18. The computer programproduct of claim 15, wherein the end-of-block symbol data comprises anend-of-block symbol encoded value and a bit length of the end-of-blocksymbol encoded value, and wherein closing the current compressed datablock comprises inserting the end-of-block symbol encoded value in thecurrent compressed data block.
 19. The computer program product of claim18, the method further comprising: determining a byte in the currentcompressed data block at which to begin insertion of the end-of-blocksymbol encoded value; and receiving, from the hardware, an indication ofa bit offset, wherein inserting the end-of-block symbol encoded valueinto the current compressed data block comprises inserting theend-of-block symbol encoded value beginning at a bit in the determinedbyte corresponding to the bit offset.
 20. The computer program productof claim 15, wherein determining that the current compressed data blockis to be closed comprises determining that a flush operation is to beperformed to insert control data into a compressed data streamcontaining the current compressed data block, wherein the control dataenables a decompressor to identify a specific location in the compresseddata stream.